package tech.aiflowy.ai.enums;

import java.util.Objects;

public enum TaskType {
    QUERY_TICKET("查询天气","1"),

    QUERY_IP("查询ip","2"),

    OTHER("其他","99");

    private String name;
    private String value;

    TaskType(String name,String value) {
        this.name = name;
        this.value = value;
    }

    public static TaskType fromDes(String des) {
        for (TaskType status : values()) {
            if (Objects.equals(status.value, des)) {
                return status;
            }
        }
        return TaskType.OTHER;
    }
}
